import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type IntegralLogDocument = IntegralLog & Document;

@Schema({ timestamps: true })
export class IntegralLog {
  @Prop({ required: true })
  integral_user_email: string;

  @Prop({ required: true })
  integral_type: string;

  @Prop({ required: true })
  integral_add_type: string;

  @Prop()
  integral_add_goods_id: string;

  @Prop({ required: true })
  integral_value: number;

  @Prop({ required: true })
  integral_reason: string;

  @Prop({ default: 0 })
  integral_deleted: number;
}

export const IntegralLogSchema = SchemaFactory.createForClass(IntegralLog); 